import { createApp } from 'vue'
import App from './App.vue'
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import './style/normalize.css'
import axios from 'axios'
import { createPinia } from 'pinia'
import router from './router/index.ts'
import 'element-plus/es/components/message/style/css'
import { Util } from './Util'

const pinia = createPinia()

router.beforeEach(Util.routerBeforeHook)

pinia.use(Util.piniaPlugin({ key: 'zhupm' }))
axios.defaults.baseURL = Util.host
// axios.defaults.baseURL = 'http://192.168.52.198'
// axios.defaults.baseURL = 'http://172.16.34.171'

const app = createApp(App)

app.use(ElementPlus).use(router).use(pinia).mount('#app')